<script lang="ts" setup>
import { NFormItem, NSelect } from "naive-ui";
import type { FormSchema } from "@/typings/dynamic-search";
import { ref } from "vue";

const props = defineProps<{
  config: FormSchema;
}>();

const localValue = ref(props.config);
</script>

<template>
  <NFormItem :label="localValue.label">
    <NSelect :placeholder="localValue.placeholder" :options="localValue.options" v-model:value="localValue.value" />
  </NFormItem>
</template>
